<!-- 

  仅提供一个网格布局（左1右2，右边上下堆叠，左右等高宽）

  props: 
    height:(String || Number)          右边每一个容器的高度

  slot: 
    one                                左边最大的容器
    two                                右边上方的容器
    three                              右边下方的容器

  demo: 
    <qm-top-three height="131">
      <div slot="one"></div>
      <div slot="two"></div>
      <div slot="three"></div>
    </qm-top-three>

-->


<template>
  <f7-block
    class="qm-top-three"
    :style="`grid-template-rows: repeat(2, calc(${height}px * var(--ratio)))`"
  >
    <div class="qm-top-three-one">
      <slot name="one"></slot>
    </div>
    <div class="qm-top-three-two">
      <slot name="two"></slot>
    </div>
    <div class="qm-top-three-three">
      <slot name="three"></slot>
    </div>
  </f7-block>
</template>

<script>
export default {
  props: {
    height: {
      type: Number | String,
      default: "106",
    },
  },
};
</script>

<style lang="less" scoped>
.qm-top-three {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(20px * var(--ratio));
  &>div{
      border-radius: calc(16px * var(--ratio));
      overflow: hidden;
  }
  &-one {
    grid-column: 1;
    grid-row-start: 1;
    grid-row-end: 3;
  }
  &-two {
    grid-column: 2;
    grid-row: 1;
  }
  &-three {
    grid-column: 2;
    grid-row: 2;
  }
}
</style>